# print('1')
# print('2')
# print('3')

# choice = input("输入 1 表示早餐吃包子，输入 2 表示早餐吃泡馍：")
# if choice == '1':
#     print("包子")
# else:
#     print("泡馍")

# choice = input("输入 1 表示早餐吃包子，输入 2 表示早餐吃泡馍：")
# if choice == '1':
#     print("包子")
# elif choice == '2':
#     print("泡馍")
# else:
#     print("输入有误")

# a = input("请输入一个整数: ")
# if a == "1":
#     print("aaa")
#         print("bbb")

# a = 10
# b = 20
#
# if a == '1':
#     if b == '2':
#         print("aaa")
#     print("bbb")
# print("ccc")

# a = b = c = d = e = f = g = 10
#
# if a == 1:
#     if b == 2:
#         if c == 3:
#             if d == 4:
#                 if e == 5:
#                     if f == 6:
#                         if g == 7:
#                             print("hello")
#                     print("1")
#         print("2")

# a = 10
#
# if a != '1':
#     pass
# else:
#     print('hello')

# if a != '1':
#     # 我这儿啥都不做
# else:
#     print('hello')

# num = int(input('请输入一个整数：'))
#
# if num % 2 == 1:
#     print('奇数')
# else:
#     print('偶数')

# num = int(input('请输入一个整数：'))
#
# if num > 0:
#     print('正整数')
# elif num < 0:
#     print('负整数')
# else:
#     print('为0')

# year = int(input("请输入年份："))
#
# if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
#     print("闰年")
# else:
#     print("平年")

# num = 1
# while num <= 10:
#     print(num)
#     num += 1

# num = 1
# while num <= 10:
#     print(num)

# 打印 1-10 的整数
# num = 1
# while num <= 10:
#     print(num)
#     num += 1

# 计算 1-100 的和
# sum = 0
# num = 1
# while num <= 100:
#     sum += num
#     num += 1
# print(f'sum = {sum}')

# 计算 5 的阶乘
# ret = 1
# num = 1
# while num <= 5:
#     ret *= num
#     num += 1
# print(f'5! = {ret}')

# 1! + 2! + 3! + 4! + 5!
# ret = 0
# i = 1
# while i <= 5:
#     j = 1
#     partSum = 1
#     while j <= i:
#         partSum *= j
#         j += 1
#     ret += partSum
#     i += 1
# print(f'1! + 2! + 3! + 4! + 5! = {ret}')

# 打印 1-10
# for num in range(1, 11):
#     print(num)

# 打印 2, 4, 6, 8, 10
# for num in range(2, 11, 2):
#     print(num)

# 打印 10-1
# for num in range(10, 0, -1):
#     print(num)

# # 假设我要吃 5 个包子
# # 吃第 3 个包子的时候吃出了一只虫 -> 丢了继续吃下一个
# for num in range(1, 6):
#     if num == 3:
#         print('包子有虫，这个包子不要了')
#         continue
#     print(f'吃第{num}包子，真香~')

# 假设我要吃 5 个包子
# 吃第 3 个包子的时候吃出了一只虫 -> 卧槽有虫！剩下的包子都不敢吃了
# for num in range(1, 6):
#     if num == 3:
#         print('包子有虫，不敢吃了')
#         break
#     print(f'吃第{num}包子，真香~')



